home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / UTIL / Startup Log.sit / Startup Log / About StartupLog next >
Text File  |  1992-08-04  |  1KB  |  28 lines

  1. About Startup Log.
  2.  
  3. StartupLog is copyright ゥ 1992 by Christopher Eliot
  4. It may be distributed freely provided it and this document are unchanged and together.
  5. All other rights reserved.
  6.  
  7. StartupLog simply adds a line to the end of a file 'log' with the date and time that the program is run, and then it exits.  If you put an alias of the program into your startup items folder you have a log of every system startup.  (Don't put the application directly into your startup items folder, because then the log file will be opened too.)  The first time you run the program it will create a text file called 'log'.  You will have to change the creator to open your favorite text editor, or better still create an empty file manually before you run StartupLog.
  8.  
  9. I wrote this to keep track of those obnoxious ten second power failures.
  10.  
  11. Sorry, bug reports and requests for new features will be ignored.  Here is the source:
  12.  
  13. void main(void)
  14. {    OSErr err;
  15.     FILE *stream;
  16.     time_t now;
  17.     
  18.     InitMac(NULL);    /* You will have to figure this out yourself. */
  19.     stream = fopen("Log", "a");
  20.     if (!stream)
  21.     {    SysBeep(10);
  22.         return;
  23.     }
  24.     now = time(NULL);
  25.     fprintf(stream, "¥rStartup at %s", ctime(&now));
  26.  
  27. }
  28.